Skip to content

Conversation

@joaomilho
Copy link

In Ruby snake case is preferred to camel case. Also, using ? for booleans. The !! will always return false instead of some empty value when it is not running. It also allows be_running (or something like that) on rspec.

In Ruby snake case is preferred to camel case. Also, using `?` for booleans. The `!!` will always return `false` instead of some empty value when it is not running. It also allows be_running (or something like that) on rspec.
@tr4n2uil
Copy link
Contributor

tr4n2uil commented Oct 18, 2016

@joaomilho Looks good, can u fix the tests ?

@tr4n2uil
Copy link
Contributor

Also we would prefer is_running? rather than running? as we have similar spec for all languages

@joaomilho joaomilho changed the title Rename isRunning to is_running and always return false when false Rename isRunning to is_running? and always return false when false Oct 18, 2016
@joaomilho
Copy link
Author

Done, let's wait for the tests.

@joaomilho
Copy link
Author

Can we merge?


def isRunning
return true if (!@pid.nil? && Process.kill(0, @pid)) rescue false
def is_running?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backward compatibility, can you also keep isRunning defined, but it should just call new method is_running?. Don't want users upgrading and having broken pipelines.

Also please update Readme with new method

@joaomilho joaomilho closed this Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants